package com.jarvis.dubbo.pojo;

import com.jarvis.dubbo.service.IValidationService;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;

/**
 * TODO XXX
 *
 * @author jarvis
 * created in 2020/9/17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ValidationModel implements Serializable {
    private static final long serialVersionUID = -4261785680248286539L;
    @NotBlank
    private String name;
    @NotBlank(groups = IValidationService.Insert.class, message = "名字不能为空")//新增时校验，其他时不校验
    private String id;
}
